package vm.machine;

public class CallInstruction extends AbstractInstruction{

    Integer address;

    public CallInstruction(Machine machine,Integer address){
        super(machine);
        this.address = address;
    }
    @Override
    public void doAction() {
    }

    @Override
    public void nextPc() {
        //machine.getStack().push(machine.getRegister("pc").getValue());
        machine.getRegister("pc").setValue(address);
    }

    @Override
    public String toString() {
        return "执行Call指令";
    }
}
